import { configureStore } from '@reduxjs/toolkit';
import authReducer from '../features/auth/authSlice';
import commentReducer from '../features/comments/commentSlice';
import dashboardReducer from '../features/dashboard/dashboardSlice';
import uiReducer from '../features/ui/uiSlice';
import modelSlice from '../features/models/modelSlice';

export const store = configureStore({
  reducer: {
    auth: authReducer,
    comments: commentReducer,
    models: modelSlice,
    dashboard: dashboardReducer,
    ui: uiReducer
  },
  middleware: (getDefaultMiddleware) => 
    getDefaultMiddleware({
      serializableCheck: false
    })
});

// 导出RootState和AppDispatch类型
export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;

    